package utilities;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class LoginTestUtil {
    private LoginTestUtil(){}
    public static boolean isLoggedin(HttpSession session){
        Object id = null;
        if((id = session.getAttribute("userid")) != null && Integer.parseInt(session.getAttribute("userid").toString())>=0){
            session.setAttribute("userid",id);
            return true;
        }

        return false;
    }
}
